/**
 * Project: complex.java
 * 
 * File Created at 2011-9-8
 * $Id$
 * 
 * Copyright 2008 Alibaba.com Croporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Alibaba Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Alibaba.com.
 */
package complex.java.serialize;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;


/**
 * TODO Comment of Route
 * @author ymkyve
 *
 */
public class Route implements Externalizable{
    private String routeId;
    private String city;
    public String getRouteId() {
        return routeId;
    }
    public void setRouteId(String routeId) {
        this.routeId = routeId;
    }
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }

    @Override
    public void writeExternal(ObjectOutput out) throws IOException {
        System.out.println("route writeExternal invoke");
        out.writeObject("杭州");
    }

    @Override
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        city=(String)in.readObject();
        System.out.println("route readExternal invoke");
    }
    @Override
    public String toString() {
        return "Route [routeId=" + routeId + ", city=" + city + "]";
    }
    
}
